package responsibility;

public class Client {
    public static void main(String[] args) {
        System.out.println("test4");
        //创建一个请假条对象
        LeaveRequest leave=new LeaveRequest("小明",1000,"身体不适");
        GroupLeader groupLeader=new GroupLeader();
        Manger manger=new Manger();
        GeneralManager generalManager=new GeneralManager();
        //设置处理者链
        groupLeader.setNextHandler(manger);
        manger.setNextHandler(generalManager);
        //小明提交请假
        groupLeader.submit(leave);

    }
}
